﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class Provider_CarInsurance_LibertyInsuranceHome : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session[CE.Global.General.UserId] == null || Session[CE.Global.General.ProviderCompanyId] == null)
        {
            Response.Redirect("~/Provider/ProviderSecureLogin.aspx");
        }

        if (!Page.IsPostBack)
        {
            CE.Global.General.ClearAllSession(this.Page, "all");
            //if (Convert.ToInt64(Session[CE.Global.General.ProviderCompanyId].ToString()) == 23)
            //{
            //    hlPAInsurance.Visible = true;
            //}
            //else
            //{
            //    hlPAInsurance.Visible = false;
            //}

            //if (Session[CE.Global.General.UserId].ToString() == "54")  //local 36, live 54 hsbc dummy accnt
            //{
            //    hlPAInsurance.Visible = true;
            //    hlnkTravel.Visible = true;
            //}
            //else
            //{
            //    hlPAInsurance.Visible = false;
            //    hlnkTravel.Visible = false;
            //}

            //if ((Session[CE.Global.General.UserId].ToString() == "53") || (Session[CE.Global.General.UserId].ToString() == "55"))  
            if (Session[CE.Global.General.UserId].ToString() == "53") 
            {
                //local 35, live53 chartis accnt
                //local 37, live55 liberty travel accnt
                hlnkTravel.Visible = true;
                hlnkCar.Visible = false;
            }

            if (Session[CE.Global.General.UserId].ToString() == "53") //chartis
            {
                hlViewStatement.Visible = false;
                hlProposalForms.Visible = false;
            }

            if (Session[CE.Global.General.UserId].ToString() == "174") //RSA
            {
                hlPAInsurance.Visible = false;
                hlnkCar.Visible = false;
                hlReviewLogs.Visible = false;
                hlStatistics.Visible = false;
            }
          
           
        }
        
    }
}
